import vcloudApiRequest from '@/utils/user-request'
import mediarequest from '@/utils/media-request'

// 获取互信企业列表
export function getCorpPartner(data) {
    return vcloudApiRequest({
        url: '/partner/info/getlist',
        method: 'get',
        params: data
    })
}

// 媒资分享
export function shareMediaToCorp(data) {
    return mediarequest({
        url: '/console/medias/rel/partners',
        method: 'put',
        data: data
    })
}

// 媒资取消分享
export function cancelMediaShare(data) {
    return mediarequest({
        url: 'console/medias/rel/partner',
        method: 'delete',
        data: data
    })
}

// 获取分享媒资列表
// type:1   获取对外分享媒资
// type:2   来自合作企业分享
export function getMediaShareList(data) {
    return mediarequest({
        url: '/console/partner/rel/medias',
        method: 'get',
        params: data
    })
}

// 互信企业统计
export function getMediaShareStatistics(data) {
    return mediarequest({
        url: '/console/partner/rel/medias/statistics',
        method: 'get',
        params: data
    })
}

// 获取媒资已分享企业的列表
export function getMediaRelPartners(data) {
    return mediarequest({
        url: '/console/media/rel/partners',
        method: 'get',
        params: data
    })
}


// 获取被分享的内容包列表
export function getPartnerRelWritepackages(data) {
    return mediarequest({
        url: '/console/partner/rel/writepackages',
        method: 'get',
        params: data
    })
}
// 获取被分享的内容包媒资统计数据
export function getPartnerRelWritepackagesStatistics(data) {
    return mediarequest({
        url: '/console/partner/rel/writepackages/statistics',
        method: 'get',
        params: data
    })
}

// 获取有写入权限的内容包列表
export function getPartnerRelSharepackages(data) {
    return mediarequest({
        url: '/console/partner/rel/sharepackages',
        method: 'get',
        params: data
    })
}
// 获取有写入权限的内容包媒资统计数据
export function getPartnerRelSharepackagesStatistics(data) {
    return mediarequest({
        url: '/console/partner/rel/sharepackages/statistics',
        method: 'get',
        params: data
    })
}